home *** CD-ROM | disk | FTP | other *** search
- Path: news.chattanooga.net!usenet
- From: "Eric W. Bradway" <ebradway@microsports.com>
- Newsgroups: comp.lang.c
- Subject: Re: How to give functions as parameters?
- Date: Wed, 31 Jan 1996 13:25:53 -0500
- Organization: Micro Sports, Inc.
- Message-ID: <310FB431.19FC@microsports.com>
- References: <Pine.SUN.3.91N2x.960130222756.11581A-100000@yellow59.nada.kth.se>
- NNTP-Posting-Host: 205.244.28.38
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I)
-
- Per Steneskog wrote:
- >
- > I have a little problem, I dont know how to send a fuction,
- > as a parameter to another function..
-
- Take a look at how the Standard C qsort function works...
-
- > do_it(do_me()); /* ERROR-COMPILE LINE */ ^ do_me is being called here - it returns a void that the
- compiler thinks you want passed to do_it.
-
- Try do_it(do_me); // and for more fun rename do_me to to_me!
-
- Have fun
- -Eric
-